<!--{template common/header}-->
<!--{if $_GET['op'] == 'msendcode'}-->
<script src="source/plugin/xinrui_mobilereg/static/js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
	function errorhandle_$_GET['handlekey'](msg) {
		if(msg == '{$_G["XRLANG_MOBLIEREG"]["reg_pc_mobile13"]}'){
			pre_verify($('#pc_reg_get_verify'));
		}
	}

	</script>
<style>
#ntcmsg_popmenu.dialogbox{top:50% !important;-ms-transform:translate(0,-50%);-o-transform:translate(0,-50%);-moz-transform:translate(0,-50%);-webkit-transform:translate(0,-50%);transform:translate(0,-50%);}
.xrLayer{width:280px;background:#fff;margin:0 auto;border:1px solid #dfdfdf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;padding:10px 20px 20px; box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box;}
.xrLoginTit{height:30px;line-height:30px;font-size:16px;font-weight:normal;margin-bottom:10px;}
.xrLoginTit a{float:right;width:30px;height:30px;display:block;text-indent:-9999px;overflow:hidden;position:relative;background:url(source/plugin/xinrui_login/template/image/close.png) no-repeat center center / 60%;}
.xrLayer .xinruiMobileForm{padding:0;}
.xinruiMobileForm li{margin-bottom:10px;position:relative;}
.xinruiMobileForm .seccodeimg{position:absolute;top:5px;right:5px;height:30px;}
.xrMobileInpt{width:100%;padding:5px;border:solid 1px #ebebeb;box-sizing:border-box; -moz-box-sizing:border-box; -webkit-box-sizing:border-box;border-radius:3px;background:#fff;height:40px;line-height:30px;font-size:14px;}
.xrLoginLi{margin:20px 0;}
.xrMobileBtn{background:#3f9f5f; border-radius:3px; width:100%; height:40px; display:block; line-height:40px; overflow:hidden; color:#fff; text-align:center;border:0;font-size:16px;}
</style>
<div class="xrLayer">
    <h3 class="xrLoginTit">
		<a href="javascript:;" onclick="popup.close();" title="{lang close}">{lang close}</a>
        <em id="return_$_GET['handlekey']">{$_G["XRLANG_MOBLIEREG"]["login_pc_mobile11"]}</em>
    </h3>
    <div class="xinruiMobileForm">
    <form id="confirmform2" name="confirmform2" method="post" action="plugin.php?id=xinrui_mobilereg&mod=setting&op=regcode&infloat=yes&confirmsubmit=yes&inajax=yes" >
        <div class="c cl">
            <!--{if !empty($_GET['infloat'])}--><input type="hidden" name="handlekey" value="$_GET['handlekey']" /><!--{/if}-->
            <input type="hidden" name="formhash" id="formhash" value="{FORMHASH}" />
            <input type="hidden" name="phone" value="{$_GET['phone']}" />
			{eval
                $sechash = 'S'.random(4);
            }
			<input name="seccodehash" id="seccodehash" type="hidden" value="$sechash" />
            <ul>
                <li>
					<input type="text" class="xrMobileInpt"  autocomplete="off" value="" id="seccodeverify_{$sechash}" name="seccodeverify" placeholder="{lang seccode}" fwin="seccode">
					<img src="misc.php?mod=seccode&update={$ran}&idhash={$sechash}&mobile=2" class="seccodeimg"/>
				</li>
				<li class="xrLoginLi">
					<button class="xrMobileBtn" type="button" name="mconfig" id="mconfig" onClick="xrLoginBtn();">{lang submit}</button>
				</li>
            </ul>
            
        </div>
    </form>
    </div>
</div> 
<script>

function xrLoginBtn(){
	$('#ntcmsg').remove();
	var data1 = $('#confirmform2').serialize();
	popup.open('<img src="' + IMGDIR + '/imageloading.gif">');
		$.ajax({
			type: 'POST',
			url: 'plugin.php?id=xinrui_mobilereg&mod=setting&op=regcode&infloat=yes&confirmsubmit=yes&handlekey=$_GET["handlekey"]&inajax=1',
			data: data1,
			dataType: 'xml',
			success: function(s) {
				popup.open(s.lastChild.firstChild.nodeValue);
				evalscript(s.lastChild.firstChild.nodeValue);
				window.setTimeout("popup.close()", 3000);
			}
		})
}

$(function() {
	$('#ntcmsg').remove();
	$('.seccodeimg').attr('src','misc.php?mod=seccode&update={$ran}&idhash={$sechash}&mobile=2');
	$('.seccodeimg').on('click', function(){
		$('#seccodeverify_$sechash').val('');
		var tmprandom = 'S' + Math.floor(Math.random() * 1000);
		$('.sechash').attr('value', tmprandom);
		$(this).attr('src', 'misc.php?mod=seccode&update={$ran}&idhash='+ tmprandom +'&mobile=2');
	});
})
</script>

<!--{/if}-->
<!--{template common/footer}-->


